package klok;

import javax.swing.*;
import java.awt.event.*;

public class KlokFrame extends JFrame {
  /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
private KlokPanel klok;

  public KlokFrame () {
    super("klokje");
    setSize (210, 240);
    klok = new KlokPanel();
    getContentPane().add(klok);
    addWindowListener(new FrameAfsluiter());
    klok.start();
  }

  private class FrameAfsluiter extends WindowAdapter {
    public void windowClosing(WindowEvent e) {
      klok.stop();
    }
  }
  public static void main (String[] args) {
    KlokFrame klok = new KlokFrame();
    klok.setVisible(true);
    klok.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
}

